package leetcode.code0098;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;
import leetcode.helper.tree.TreeArray;
import leetcode.helper.tree.TreeNode;

public abstract class Solution98 implements IDebug {

	public abstract boolean isValidBST(TreeNode root);

	@Override
	public void debug1() {
		String str = "[2,1,3]";
		TreeNode root = TreeArray.array2tree(HelpDebug.str2array4(str));
		boolean e = true;
		boolean r = this.isValidBST(root);
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug2() {
		String str = "[5,1,4,null,null,3,6]";
		TreeNode root = TreeArray.array2tree(HelpDebug.str2array4(str));
		boolean e = false;
		boolean r = this.isValidBST(root);
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug3() {
		// [5,4,6,null,null,3,7]

		String str = "[5,4,6,null,null,3,7]";
		TreeNode root = TreeArray.array2tree(HelpDebug.str2array4(str));
		boolean e = false;
		boolean r = this.isValidBST(root);
		HelpDebug.compare(e, r);

	}

	@Override
	public void debug4() {
		// TODO Auto-generated method stub

	}

}
